/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;

/** Generated Model for hrm_tax
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_tax extends PO implements I_hrm_tax, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20121203L;

    /** the default Constructor */
    public X_hrm_tax(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_hrm_tax (Properties ctx, int hrm_tax_ID, String trxName)
    {
      super (ctx, hrm_tax_ID, trxName);
      /** if (hrm_tax_ID == 0)
        {
			setC_BPartner_ID (0);
			sethrm_relief (Env.ZERO);
// 0
			sethrm_tax_ID (0);
			setisRelief (false);
// N
        } */
    }

    /** Load Constructor */
    public X_hrm_tax (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_tax[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Date From.
		@param DateFrom 
		Starting date for a range
	  */
	public void setDateFrom (Timestamp DateFrom)
	{
		set_Value (COLUMNNAME_DateFrom, DateFrom);
	}

	/** Get Date From.
		@return Starting date for a range
	  */
	public Timestamp getDateFrom () 
	{
		return (Timestamp)get_Value(COLUMNNAME_DateFrom);
	}

	/** Set hrm_CNalog.
		@param hrm_CNalog hrm_CNalog	  */
	public void sethrm_CNalog (BigDecimal hrm_CNalog)
	{
		set_Value (COLUMNNAME_hrm_CNalog, hrm_CNalog);
	}

	/** Get hrm_CNalog.
		@return hrm_CNalog	  */
	public BigDecimal gethrm_CNalog () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_CNalog);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_cnalogfinal.
		@param hrm_cnalogfinal hrm_cnalogfinal	  */
	public void sethrm_cnalogfinal (BigDecimal hrm_cnalogfinal)
	{
		set_Value (COLUMNNAME_hrm_cnalogfinal, hrm_cnalogfinal);
	}

	/** Get hrm_cnalogfinal.
		@return hrm_cnalogfinal	  */
	public BigDecimal gethrm_cnalogfinal () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_cnalogfinal);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_COtch.
		@param hrm_COtch hrm_COtch	  */
	public void sethrm_COtch (BigDecimal hrm_COtch)
	{
		set_Value (COLUMNNAME_hrm_COtch, hrm_COtch);
	}

	/** Get hrm_COtch.
		@return hrm_COtch	  */
	public BigDecimal gethrm_COtch () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_COtch);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_IPN.
		@param hrm_IPN hrm_IPN	  */
	public void sethrm_IPN (BigDecimal hrm_IPN)
	{
		set_Value (COLUMNNAME_hrm_IPN, hrm_IPN);
	}

	/** Get hrm_IPN.
		@return hrm_IPN	  */
	public BigDecimal gethrm_IPN () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_IPN);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_OPV.
		@param hrm_OPV hrm_OPV	  */
	public void sethrm_OPV (BigDecimal hrm_OPV)
	{
		set_Value (COLUMNNAME_hrm_OPV, hrm_OPV);
	}

	/** Get hrm_OPV.
		@return hrm_OPV	  */
	public BigDecimal gethrm_OPV () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_OPV);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_relief.
		@param hrm_relief hrm_relief	  */
	public void sethrm_relief (BigDecimal hrm_relief)
	{
		set_Value (COLUMNNAME_hrm_relief, hrm_relief);
	}

	/** Get hrm_relief.
		@return hrm_relief	  */
	public BigDecimal gethrm_relief () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_relief);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_tax.
		@param hrm_tax_ID hrm_tax	  */
	public void sethrm_tax_ID (int hrm_tax_ID)
	{
		if (hrm_tax_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_tax_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_tax_ID, Integer.valueOf(hrm_tax_ID));
	}

	/** Get hrm_tax.
		@return hrm_tax	  */
	public int gethrm_tax_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_tax_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set total amount.
		@param hrm_total total amount	  */
	public void sethrm_total (BigDecimal hrm_total)
	{
		set_Value (COLUMNNAME_hrm_total, hrm_total);
	}

	/** Get total amount.
		@return total amount	  */
	public BigDecimal gethrm_total () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_total);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_typetax.
		@param hrm_typetax hrm_typetax	  */
	public void sethrm_typetax (String hrm_typetax)
	{
		set_Value (COLUMNNAME_hrm_typetax, hrm_typetax);
	}

	/** Get hrm_typetax.
		@return hrm_typetax	  */
	public String gethrm_typetax () 
	{
		return (String)get_Value(COLUMNNAME_hrm_typetax);
	}

	/** Set isRelief.
		@param isRelief isRelief	  */
	public void setisRelief (boolean isRelief)
	{
		set_Value (COLUMNNAME_isRelief, Boolean.valueOf(isRelief));
	}

	/** Get isRelief.
		@return isRelief	  */
	public boolean isRelief () 
	{
		Object oo = get_Value(COLUMNNAME_isRelief);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}
}